package com.example.volunteer.service;

import com.example.volunteer.model.Activity;
import com.example.volunteer.util.PageResult;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public interface ActivityService {
    void createActivity(Activity activity);
    void updateActivity(Activity activity);
    void updateActivityStatus(Integer activityId, String status);
    Activity findById(Integer activityId);
    void delete(Integer activityId);

    // 分页查询方法
    PageResult<Activity> findActivitiesWithPage(int pageNum, int pageSize);
    PageResult<Activity> findByTitleWithPage(String title, int pageNum, int pageSize);
    PageResult<Activity> findByStartTimeWithPage(Date startTime, int pageNum, int pageSize);
    PageResult<Activity> findByEndTimeWithPage(Date endTime, int pageNum, int pageSize);
    PageResult<Activity> findByAddressWithPage(String address, int pageNum, int pageSize);
    PageResult<Activity> findByParticipantLimitWithPage(Integer participantLimit, int pageNum, int pageSize);
    PageResult<Activity> findByCreatedTimeWithPage(Date createdTime, int pageNum, int pageSize);
    PageResult<Activity> findByAdminIdWithPage(String adminId, int pageNum, int pageSize);
    PageResult<Activity> findByStatusWithPage(String status, int pageNum, int pageSize);
}